JAVA 6: JDBC AND DATABASE APPLICATIONS by POUL KLAUSEN
Author:POUL KLAUSEN [KLAUSEN , POUL]
Language: eng
Format: azw3, epub
Publisher: UNKNOWN
Published: 2021-01-12T16:00:00+00:00
After the prototype is finished, Iâve created a copy of the project, which I have called World0 . I will now continue to work on the project, but with the copy I can always return to the prototype.
102102 THE DATA MODEL As a next step I have written some model classes, and thus the classes to represent the programâs data.
Thereâs added three very simple model classes, representing respectively a continent, a country and currency: - Continent
- Country
- Currency
The classes are directly modeling the rows in the corresponding database tables, however, the class Currency extends with a list containing Country objects for the countries using this currency.
There are also defined a collection for each of the above types: - Continents
- Countries
- Currencies
. each of which includes an object for each row in the corresponding database table. Here the first of the classes is trivial, while the other two are reprogrammings of the corresponding classes from the prototype. The two classes are thus at the same time model for the programâs JTable components.
The total model is represented by the class DataModel, which is a simple class that is made up of an object by each of the above three collections. The programâs model can be illustrated as follows:
The three collections must be initialized, which is done by reading the corresponding database tables. To this end, it is written a class Repository, which only has static methods, including among others, methods that creates the three collection classes. The class Repository also has update methods for the tables currency and country, and that means that everything that has to do with the database is collected in this class. If the application must use a different database, it means that only this class has to be changed. The class Repository is a relatively complex class, as everything concerning the database and SQL are gathered here, and thus everything that is introduced in this book.
THE USER INTERFACE
The programâs user interface consists besides MainView of
- CurrencyView which is a dialog box for maintenance of currencies
- CountryView which is a dialog box for maintaining the countries Furthermore, there is a secondary dialog box called ErrorView and is used to display a list of errors with the import of exchange rates. Below is the MainView, which is the same view as in the prototype, but this time initialized with data:
For each view (except ErrorView) there is attached a controller. The goal is that the controller class should validate the user input and choices, and it is also, where appropriate the controller classes that calls the methods in the class Repository to update the model. The controller classes for the two dialog boxes for maintaining respectively currencies and countries works in principle the same. Below is the dialog for maintaining currency:
It is the same dialog that is used regardless of whether to create a new currency, or to edit an existing currency. In this case, there is double clicked EUR, in the main window.
Similarly is below shown the dialog box
Download
JAVA 6: JDBC AND DATABASE APPLICATIONS by POUL KLAUSEN.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7806)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6802)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6797)
Running Windows Containers on AWS by Marcio Morales(6318)
Kotlin in Action by Dmitry Jemerov(5089)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5046)
Combating Crime on the Dark Web by Nearchos Nearchou(4620)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4571)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4437)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4311)
The Age of Surveillance Capitalism by Shoshana Zuboff(3977)
Python for Security and Networking - Third Edition by José Manuel Ortega(3873)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3532)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3528)
Learn Wireshark by Lisa Bock(3489)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3353)
Blockchain Basics by Daniel Drescher(3322)
